package com.mrx.xfriendship.service;

import com.mrx.commons.exception.BusinessException;
import com.mrx.xfriendship.model.dto.MailDTO;
import com.mrx.xfriendship.model.vo.PostVO;

/**
 * @author Mr.X
 * @since 2023-02-12 18:09
 */
public interface IMailService {

    /**
     * 发送邮件
     *
     * @param mailRequest 邮件对象
     */
    void sendSimpleMail(MailDTO mailRequest);

    /**
     * 发送 绑定邮箱 邮件
     *
     * @param to       接收人
     * @param userName 用户名
     */
    void sendBindMail(String to, String userName) throws BusinessException;

    void sendRecoveryMail(String server, String userName);

    void sendRecoveryMail(String mail);

    void recoveryConfirm(String userName, String code);

    void sendFeedbackMail(PostVO body);

    void recoveryWithEmailConfirm(String mail, String code);
}
